package com.xt.purchasingsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xt.purchasingsystem.model.SupplierApprovalDetails;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yhp
 * @since 2020-05-31
 */
public interface SupplierApprovalDetailsMapper extends BaseMapper<SupplierApprovalDetails> {
    /**
     * 根据申请审批管理编号查询此编号所有明细的方法
     * @param approvalId
     * @return
     */
    List<SupplierApprovalDetails> getAllByApprovalId(String approvalId);

    /**
     * 根据供应商编号和产品编号查询对应的供应商申请审批明细
     * @param supplierId
     * @param productId
     * @return
     */
    SupplierApprovalDetails getSupplierApprovalDetailsByProductId(@Param("supplierId") String supplierId, @Param("productId") String productId);
}
